import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('../views/Home/Home.vue'),
    // redirect: "/index"
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/Home/Home.vue'),
    children: [
      // 首页
      {
        path: '/index',
        name: 'index',
        component: () => import('../views/Index/Index.vue'),
      },
      // 登录
      {
        path: '/login',
        name: 'login',
        component: () => import('../views/Login/Login.vue'),
      },
      // 商品管理

      { path: '/shop', name: 'shop', meta: { title: '商品列表' }, component: () => import('../views/Shop/ShopList/S_ShopList.vue') },
      { path: '/group', name: 'group', meta: { title: '商品组' }, component: () => import('../views/Shop/ShopGroup/S_Group.vue') },
      { path: '/classify', name: 'classify', meta: { title: '分类管理' }, component: () => import('../views/Shop/ShopClassify/S_Classify.vue') },
      { path: '/brand', name: 'brand', meta: { title: '品牌管理' }, component: () => import('../views/Shop/ShopBrand/S_Brand.vue') },
      { path: '/setup', name: 'setup', meta: { title: '设置' }, component: () => import('../views/Shop/ShopSetUp/S_SetUp.vue') },

      // 订单管理
      { path: '/order', name: 'order', component: () => import('../views/Order/OrderView/Order.vue') },
      { path: '/orderIndex', name: 'orderIndex', meta: { title: '分类管理' }, component: () => import('../views/Order/OrderStataus/OrderIndex.vue') },
      { path: '/activistIndex', name: 'activistIndex', component: () => import('../views/Order/OrderActivist/ActivistIndex.vue') },
      { path: '/batchSend', name: 'batchSend', component: () => import('../views/Order/OrderUtils/BatchSend.vue') },

      // 财务管理
      { path: '/financial', name: 'financial', component: () => import('../views/Financial/Financial.vue') },
      { path: '/leaveQuota', name: 'leaveQuota', component: () => import('../views/Financial/LeaveQuota.vue') },
      { path: '/billSupervise', name: 'billSupervise', component: () => import('../views/Financial/BillSupervise.vue') },
      { path: '/fullRecord', name: 'fullRecord', component: () => import('../views/Financial/FullRecord.vue') },

      // 优惠管理
      { path: '/sale', name: 'sale', component: () => import('../views/Sale/Sale.vue') },
      { path: '/sale_Discount', name: 'Sale_Discount', component: () => import('../views/Sale/Sale_Discount.vue') },

      // 会员管理
      { path: '/vipList', name: 'vip', component: () => import('../views/Vip/VipList.vue') },
      { path: '/vipSummary', name: 'vip', component: () => import('../views/Vip/vipSummary.vue') },
      { path: '/vipGrade', name: 'vip', component: () => import('../views/Vip/vipGrade.vue') },
      { path: '/vipGrouping', name: 'vip', component: () => import('../views/Vip/vipGrouping.vue') },

      // 活动管理
      { path: '/seckillAdmin', name: 'seckillAdmin', component: () => import('../views/Seckill/seckillAdmin.vue') },
      { path: '/doughAdmin', name: 'doughAdmin', component: () => import('../views/Seckill/doughAdmin.vue') },

      // 积分商城
      { path: '/integral', name: 'integral', component: () => import('../views/Integral/Integral.vue') },
      { path: '/bananerAdmin', name: 'bananerAdmin', component: () => import('../views/Integral/bananerAdmin.vue') },
      { path: '/classifyAdmin', name: 'classifyAdmin', component: () => import('../views/Integral/classifyAdmin.vue') },
      { path: '/stateAdmin', name: 'stateAdmin', component: () => import('../views/Integral/stateAdmin.vue') },

      // 权限管理
      { path: '/storeAdmin', name: 'storeAdmin', component: () => import('../views/Jurisdiction/storeAdmin.vue') },
      { path: '/adminAdmin', name: 'adminAdmin', component: () => import('../views/Jurisdiction/adminAdmin.vue') },
      { path: '/WithdrawalAudit', name: 'WithdrawalAudit', component: () => import('../views/Jurisdiction/WithdrawalAudit.vue') },
      { path: '/roleAdmin', name: 'roleAdmin', component: () => import('../views/Jurisdiction/roleAdmin.vue') },

      // 评价管理
      { path: '/eva', name: 'eva', component: () => import('../views/Evaluate/Evaluate.vue') },
      // 信息管理
      { path: '/mess', name: 'mess', component: () => import('../views/Message/mess.vue') },
      { path: '/Cooperation', name: 'Cooperation', component: () => import('../views/Message/Cooperation.vue') },
      { path: '/Questions', name: 'Questions', component: () => import('../views/Message/Questions.vue') },
    ],
  },
]

const router = new VueRouter({
  routes,
  mode: 'hash',
})

export default router
